<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in.1</name>
<id>-1</id>
<cardCount>230</cardCount>
<cardID>5883</cardID>
<listID>65978</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>on openStackglobal Manual, TheDays, Talk, byChannel, SPortGlobalsglobal onLine, fromRcvr,commanding,instantChannel,flashing, stationList,countryListif the version < 2.0 thenanswer "This utility requires HyperCard 2.0 or later."go homeend ifset the userLevel to 5set lockScreen to trueset textArrows to truehide msgdoNewMenuset icon of bg button id 60 to "receiverControl OFF"set the name of bg button id 60 to "Control OFF"put true into Manualput false into commandingset the name of bg button id 52 to "Following 525"hide bg button id 52put false into Talkput empty into fromRcvrput false into onLineput "Sun,Mon,Tue,Wed,Thu,Fri,Sat" into TheDaysset the highlite of bg btn id 39 to trueset the highlite of bg btn id 60 to trueset the highlite of bg btn id 41 to trueset the highlite of bg btn id 42 to trueset the highlite of bg btn id 55 to trueset the highlite of bg btn id 56 to trueset the highlite of bg btn id 59 to trueloadStationListend openStack-- -- -- -- -- -- -- -- -- -- -- -- -- -- --on doNewMenuput "-" after menu "File"put "Quit Mac525" after menu "File" with menuMsgs "doLeave"create menu "Mac525"put "About Mac525...,-,Write file...,Read file...,Print report...,-,Sweep by Freq,Sweep by Band,-,Edit Station List,Preferences" into menu "Mac525"¬with menuMsgs "doAbout,,doWriteFile,doReadFile,doChannelReport,,doFreqScan,doBandScan,,doEditStations,doPrefs"end doNewMenu-- -- -- -- -- -- -- -- -- -- -- -- -- -- --on loadStationListput empty into stationListput empty into countryListrepeat with x = 1 to the number of lines of cd field "Station List" of cd "Station Entry"put item 1 of line x of (cd field "Station List" of cd "Station Entry") & return after stationListput item 2 of line x of (cd field "Station List" of cd "Station Entry") & return after countryListend repeatdelete the last char of stationListdelete the last char of countryListPUT "CANCEL FIND OPERATION" & return & STATIONLIST & return INTO CD FIELD "FIND LIST"end loadStationList-- -- -- -- -- -- -- -- -- -- -- -- -- -- --on InitSerialPortif the highlight of cd button "Printer Port" of cd "Mac525 Preferences" thenput "printerPort" into thePortelseput "modemPort" into thePortend ifif the highlight of cd button "1200 baud" of cd "Mac525 Preferences" thenput "baud1200" into theBaudelseput "baud300" into theBaudend ifconfigureSPort thePort,theBaud,data8,stop10,parityOff,stripOn,stripControlsOn,lineFeedsOffsetSPortBufferSize 10240end InitSerialPort-- -- -- -- -- -- -- -- -- -- -- -- -- -- --on closeStackhide cd field "Find List" of cd "Main Control Panel"if icon of bg btn id 60 of cd 1 is 5029 thenclick at the loc of bg button id 60 of cd 1end ifreset menuBarcloseSPortend closeStackOn doLeavecloseStackgo homeend doLeaveon doAboutlock Screengo cd 1click at the loc of bg btn id 29unlock Screenend doAbouton doEditStationsgo to cd "Station Entry"end doEditStationson doWriteFileglobal inReportWriteask file "Enter name for channel data file" with "Mac525 Backup (" & the date & ")"if It is empty thengo to card "Main Control Panel"exit doWriteFileend ifput It into fileNameopen file fileNamevisual effect dissolve fastput true into inReportWritego to card "Channel000"repeat with Num = 0 to 199set cursor to busyput empty into outRecput bg fld "channel #" & tab after outRecput bg fld "Station" & tab after outRecset cursor to busyput bg fld "Country" & tab after outRecput bg fld "kHz" & tab after outRecput bg fld "Mode" & tab after outRecset cursor to busyput bg fld "Bandwidth" & tab after outRecput bg fld "AGC" & tab after outRecput bg fld "Attenuator" & tab after outRecset cursor to busyput bg fld "Remarks" after outRecput "¶" after outRec -- see doReadFile!!write outRec to file fileNameset cursor to busyif Num < 199 then go to next cardadd 1 to Numend repeatclose file fileNameput false into inReportWriteanswer "Report completed!" with "Ok"visual effect dissolve fastgo to card "Main Control Panel"end doWriteFileon doReadFileglobal inChannelReadanswer "This will overwrite the channels currently stored in the stack! Do you want to do this?" with "Go Ahead" or "Cancel"if it is "Cancel" thenexit doReadFileend ifanswer file "Enter name of file containing channel data" of type "TEXT"if the result is not empty thenexit doReadFileend ifput It into fileNameopen file fileName-- execute this loop until EOFput True into inChannelReadgo to card "Channel000"repeat with Num = 0 to 199read from file fileName until "¶"if it is empty thenclose file fileNameput false into inChannelReadhide messageanswer "File read completed!" with "Ok"visual effect dissolve fastgo to card "Main Control Panel"exit doReadFileend ifput it into msg-- wait until the mouseClickput char 1 to offset (tab,it) - 1 of it into bg fld "channel #"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "Station"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "Country"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "kHz"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "Mode"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "Bandwidth"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "AGC"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "Attenuator"delete char 1 to offset (tab,it) of itput char 1 to offset ("¶",it) - 1 of it into bg fld "Remarks"if Num < 199 then go to next card of bg "Channel Data"-- add 1 to Numend repeatclose file fileNameput false into inChannelReadhide messageanswer "File read completed!" with "Ok"visual effect dissolve fastgo to card "Main Control Panel"exit doReadFileend doReadFileon doChannelReportunmark all cardsgo to cd "Channel Report"end doChannelReporton doFreqScanglobal scanHi,scanLo,scanUpgo to card "Frequency Select"end doFreqScanon doBandScanglobal scanHi,scanLo,scanUpgo to card "Band Select"end doBandScan-- on doChannelScan-- global scanHi,scanLo,scanUp-- go to card "Channel Select"-- end doChannelScanon doPrefsvisual effect iris open fastgo cd "Mac525 Preferences"end doPrefson sendFreqglobal commandingif not commanding thenflash 2exit sendFreqend ifput bg fld "DIAL" of card 1 INTO dialTempmultiply dialTemp by 100set numberFormat to "00000000.#"sendSPort "F" & dialTemp-- put "F" & dialTemp into Messageend sendFreqon doModeglobal commandingif not commanding thenflash 2exit doModeend ifif line 1 of BG FIELD "MODE" of card "Main Control Panel" = "RTTY" thensendSPort "D0"else if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "CW" thensendSPort "D1"else if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "USB" thensendSPort "D2"else if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "LSB" thensendSPort "D3"else if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "AM" thensendSPort "D4"else if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "FM" thensendSPort "D5"else if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "FAX" thensendSPort "D6"else if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "AM-USB" thensendSPort "D7"else if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "AM-LSB" thensendSPort "D8"end ifend doModeon doBWglobal commandingif not commanding thenflash 2exit doBWend ifif line 1 of BG FIELD FILTER of card "Main Control Panel" = "WIDE" thensendSPort "B0"else if line 1 of BG FIELD FILTER of card "Main Control Panel" = "INTER" thensendSPort "B1"else if line 1 of BG FIELD FILTER of card "Main Control Panel" = "NARR" thensendSPort "B2"else if line 1 of BG FIELD FILTER of card "Main Control Panel" = "AUX" thensendSPort "B3"end ifend doBWon doATTglobal commandingif not commanding thenflash 2exit doATTend ifif line 1 of bg field "ATT" of card "Main Control Panel" = "-0 dB" thensendSPort "A0"else if line 1 of bg field "ATT" of card "Main Control Panel" = "-20 dB" thensendSPort "A1"end ifend doATTon doAGCglobal commandingif not commanding thenflash 2exit doAGCend ifif line 1 of bg field "AGC" of card "Main Control Panel" = "SLOW" thensendSPort "G0"else if line 1 of bg field "AGC" of card "Main Control Panel" = "FAST" thensendSPort "G1"else if line 1 of bg field "AGC" of card "Main Control Panel" = "OFF" thensendSPort "G2"end ifend doAGCon enterKeysend mouseUp to bg button "ENTER" of cd 1end enterKeyon Idleglobal Manual, TheDays, onLIne, fromRcvr, offsetUTC-- Manual says we've made a change to parameters previously set by-- a memory channel recall (this makes the "MR" indicator mimic the-- real one on the 525.-- if Manual is true then-- put empty into bg field "Mem Recall" of card "Main Control Panel"-- else-- put "MR" into bg field "Mem Recall" of card "Main Control Panel"-- end if-- update the UTC clock and calendar every 15 secondsput the seconds into Tempif Temp mod 15 = 0 thenput Temp + (offsetUTC*60*60) into TempSecsset numberFormat to "00"convert TempSecs to dateItemsput (item 4 of TempSecs *1) & ":" & (item 5 of TempSecs *1) && "UTC" into bg field "UTC Time" of card "Main Control Panel"put item 7 of TempSecs into Tempput item Temp of TheDays & " " & item 2 of TempSecs & "/" & item 3 of TempSecs into bg field "UTC Date" of card "Main Control Panel"end if-- if any parameters sent from receiver, get then and update displayif onLine thenput recvUpTo(return,0,fromRcvr) into fromRcvr -- get chars up to a return; don't waitif fromRcvr is not empty then -- there are chars; parse themif (the last char of fromRcvr) is return then -- got a complete commanddelete the last char of fromRcvr -- strip the returnput the first char of fromRcvr into theCmd -- extract the command identifier-- delete the first char of fromRcvrput fromRcvr into theParam -- put the remainder into parameterdelete the first char of theParam -- strip the command letterput empty into fromRcvr -- clear for next command-- determine which command was received & process itif theCmd is "A" thenif theParam is "0" thenput "-0 dB" into bg fld "Att" of card "Main Control Panel"else if theParam is "1" thenput "-20 dB" into bg fld "Att" of card "Main Control Panel"end ifelse if theCmd is "B" thenif theParam is "0" thenput "WIDE" into bg fld "Filter" of card "Main Control Panel"else if theParam is "1" thenput "INTER" into bg fld "Filter" of card "Main Control Panel"else if theParam is "2" thenput "NARR" into bg fld "Filter" of card "Main Control Panel"else if theParam is "3" thenput "AUX" into bg fld "Filter" of card "Main Control Panel"end ifelse if theCmd is "C" thenset numberFormat to "000"put theParam + 0 into bg fld "Channel" of card "Main Control Panel"else if theCmd is "D" thenif theParam is "0" thenput "RTTY" into bg fld "Mode" of card "Main Control Panel"else if theParam is "1" thenput "CW" into bg fld "Mode" of card "Main Control Panel"else if theParam is "2" thenput "USB" into bg fld "Mode" of card "Main Control Panel"else if theParam is "3" thenput "LSB" into bg fld "Mode" of card "Main Control Panel"else if theParam is "4" thenput "AM" into bg fld "Mode" of card "Main Control Panel"else if theParam is "5" thenput "FM" into bg fld "Mode" of card "Main Control Panel"else if theParam is "6" thenput "FAX" into bg fld "Mode" of card "Main Control Panel"end i